package com.itheima.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.domain.OmsCompanyAddress;
import com.itheima.mapper.OmsCompanyAddressMapper;
import com.itheima.service.OmsCompanyAddressService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 公司收发货地址表 服务实现类
 * </p>
 *
 * @author zhuguo
 * @since 2022-11-10
 */
@DubboService
public class OmsCompanyAddressServiceImpl extends ServiceImpl<OmsCompanyAddressMapper, OmsCompanyAddress> implements OmsCompanyAddressService {

    @Autowired
    OmsCompanyAddressMapper omsCompanyAddressMapper;

    @Override
    public OmsCompanyAddress findCompanyAddressById(Long companyAddressId) {
        return omsCompanyAddressMapper.selectById(companyAddressId);
    }

    @Override
    public List<OmsCompanyAddress> selectAll() {
        QueryWrapper<OmsCompanyAddress> qw = new QueryWrapper<>();
        return omsCompanyAddressMapper.selectList(qw);
    }
}
